home *** CD-ROM | disk | FTP | other *** search
- Subject: v14i084: Flex, a lex replacement, Patch1
- Newsgroups: comp.sources.unix
- Sender: sources
- Approved: rsalz@uunet.UU.NET
-
- Submitted-by: Vern Paxson <vern@lbl-rtsg.arpa>
- Posting-number: Volume 14, Issue 84
- Archive-name: flex/patch1
-
- These patches fix two bugs:
- "\^" not correctly matching a caret
- flex scanners compiled using -f or -F can die
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of shell archive."
- # Contents: patch.1 patch.2
- # Wrapped by rsalz@fig.bbn.com on Fri May 6 16:28:01 1988
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'patch.1' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'patch.1'\"
- else
- echo shar: Extracting \"'patch.1'\" \(561 characters\)
- sed "s/^X//" >'patch.1' <<'END_OF_FILE'
- Greg Lee mentioned a bug regarding "\^" not correctly matching a caret
- in the input. This is due to a throw-back to the dark ages, and the
- fix follows.
- X
- revision 1.3
- X*** scan.l Thu May 5 14:32:53 1988
- X--- /tmp/da1563 Thu May 5 14:36:11 1988
- X***************
- X*** 48,54 ****
- X
- X SCNAME {NAME}
- X
- X! ESCSEQ \\([^\n]|0[0-9]{1,3})
- X
- X %%
- X static int bracelevel, didadef;
- X--- 48,54 ----
- X
- X SCNAME {NAME}
- X
- X! ESCSEQ \\([^^\n]|"^".|0[0-9]{1,3})
- X
- X %%
- X static int bracelevel, didadef;
- X
- END_OF_FILE
- if test 561 -ne `wc -c <'patch.1'`; then
- echo shar: \"'patch.1'\" unpacked with wrong size!
- fi
- # end of 'patch.1'
- fi
- if test -f 'patch.2' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'patch.2'\"
- else
- echo shar: Extracting \"'patch.2'\" \(916 characters\)
- sed "s/^X//" >'patch.2' <<'END_OF_FILE'
- flex scanners compiled using -f or -F can generate bogus "NULL in input"
- messages (and then die). The fix follows.
- X
- X Vern
- X
- X*** parse.y Thu May 5 13:36:18 1988
- X--- /tmp/da1569 Thu May 5 14:43:06 1988
- X***************
- X*** 27,48 ****
- X
- X %%
- X goal : initlex sect1 sect1end sect2
- X- { /* add default rule */
- X- int def_rule;
- X-
- X- pat = cclinit();
- X- cclnegate( pat );
- X-
- X- def_rule = mkstate( -pat );
- X-
- X- add_accept( def_rule, 0, 0 );
- X-
- X- for ( i = 1; i <= lastsc; ++i )
- X- scset[i] = mkbranch( scset[i], def_rule );
- X-
- X- fputs( "YY_DEFAULT_ACTION;\n\tYY_BREAK\n",
- X- temp_action_file );
- X- }
- X ;
- X
- X initlex :
- X--- 27,32 ----
- X
- X
- END_OF_FILE
- if test 916 -ne `wc -c <'patch.2'`; then
- echo shar: \"'patch.2'\" unpacked with wrong size!
- fi
- # end of 'patch.2'
- fi
- echo shar: End of shell archive.
- exit 0
-